//
//  ClassifyCollectionViewCell.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/7/4.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "ClassifyCollectionViewCell.h"

@implementation ClassifyCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    self.iconImg = [[UIImageView alloc] init];
    //    [_iconImg sizeToFit];
    _iconImg.image = UIImageNamed(@"placeholder");
    _iconImg.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:_iconImg];
    [_iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.centerY.equalTo(self.mas_centerY).offset(-rateHeight(20));
        make.size.mas_offset(CGSizeMake(rateHeight(90), rateHeight(90)));
    }];
    self.textLB = [UILabel labelWithText:@"分类标题" textColor:UIColorFromRGB(0x909090) fontSize:11];
    [_textLB sizeToFit];
    [self addSubview:_textLB];
    [_textLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.bottom.equalTo(self).offset(-rateHeight(20));
    }];
}

@end
